package com.carlosk.kandicar.domain;


/**
 * 分页对象
 * 
 * @author carlos carlosk@163.com
 * @version 创建时间：2014年4月18日 上午12:17:22 类说明
 */

public class PageDomain extends BaseDomain {
	private int pageIndex;
	private int pageCount;
	private int totalCount;
	private final static int pageSize  = 10;

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
		//设置总的数目
		pageCount = totalCount /pageSize;
		if (totalCount % pageSize > 0) {
			pageCount ++;
		}
	}

	public PageDomain() {
		super();
		clear();
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public int getPageCount() {
		return pageCount;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void clear() {
		// 重置
		pageIndex = 0;
		pageCount = 0;
	}

}
